import React from 'react'
import LinkA from '@/components/publics/LinkA.jsx'
/**
 * 返回列表的构造数据项
 * @param {this} self
 */
export default (self) => {
  return [
    {
      title: '分类名称',
      key: 'name',
      dataIndex: 'name',
    },
    {
      width: 300,
      title: '操作',
      key: 'operation',
      dataIndex: 'operation',
      render: (text, record, index) => (
        <span>
          <LinkA
            title="修改分类"
            onClickLink={() => self.editCategory(record)}
          ></LinkA>
          <LinkA
            title="查看子分类"
            onClickLink={() => self.lookeChildCategory(record)}
          ></LinkA>
        </span>
      ),
    },
  ]
}
